import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { HydratedDocument } from 'mongoose';

export type RechargeTempDocument = HydratedDocument<RechargeTemp>;

@Schema()
export class RechargeTemp {
  @Prop({
    type : 'string'
  })
  orderNo: string;

  @Prop({
    type : 'number'
  })
  status: number;

  @Prop({
    type : 'object'
  })
  data: {
    amount : number,
    reward : number,
    userId : number,
    payChannel : number
  };

  @Prop({
    type : 'number'
  })
  time: number;

}

export const RechargeTempSchema = SchemaFactory.createForClass(RechargeTemp);
